package com.solution.model;

import static javax.persistence.GenerationType.SEQUENCE;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="Client_Type"
    ,schema="public"
)
public class ClientType extends AbstractPO{

	private static final long serialVersionUID = 1L;
	
    private Long id;
    private String clientName;
    private ContactType contactType;
	private Short accountType;
    private Long earnedAmount;
    private Long spendAmount;
    private Long userCost;
    private Short status;
    private String statusReason;
    private String createdBy;
    private Date createdOn;
    private String modifiedBy;
    private Date modifiedOn;
    private String rfu1;
    private String rfu2;
    private String rfu3;
  
    @SequenceGenerator(name="generator", sequenceName="client_type_seq")@Id @GeneratedValue(strategy=SEQUENCE, generator="generator")
    
    @Column(name="Client_TypeID", unique=true, nullable=false, precision=10, scale=0)
    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    @Column(name="Client_Name", nullable=false, length=50)
    public String getClientName() {
        return this.clientName;
    }
    
    public void setClientName(String clientName) {
        this.clientName = clientName;
    }
    
    @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.ALL)
    @JoinColumn(name="Contact_TypeID")
    public ContactType getContactType() {
		return contactType;
	}

	public void setContactType(ContactType contactType) {
		this.contactType = contactType;
	}

	@Column(name="Account_Type", precision=4, scale=0)
	public Short getAccountType() {
		return accountType;
	}

	public void setAccountType(Short accountType) {
		this.accountType = accountType;
	}

	@Column(name="Earned_Amount", precision=10, scale=0)
	public Long getEarnedAmount() {
		return earnedAmount;
	}

	public void setEarnedAmount(Long earnedAmount) {
		this.earnedAmount = earnedAmount;
	}

	@Column(name="Spend_Amount", precision=10, scale=0)
	public Long getSpendAmount() {
		return spendAmount;
	}

	public void setSpendAmount(Long spendAmount) {
		this.spendAmount = spendAmount;
	}

	@Column(name="User_Cost", precision=10, scale=0)
	public Long getUserCost() {
		return userCost;
	}

	public void setUserCost(Long userCost) {
		this.userCost = userCost;
	}
    
    @Column(name="Status", nullable=false, precision=4, scale=0)
    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
    }
    
    @Column(name="Status_Reason", length=2000)
    public String getStatusReason() {
        return this.statusReason;
    }
    
    public void setStatusReason(String statusReason) {
        this.statusReason = statusReason;
    }
    
    @Column(name="CreatedBy", nullable=false, length=50)
    public String getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }
    
    @Column(name="CreatedOn", nullable=false, length=23)
    public Date getCreatedOn() {
        return this.createdOn;
    }
    
    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }
    
    @Column(name="ModifiedBy", length=50)
    public String getModifiedBy() {
        return this.modifiedBy;
    }
    
    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy;
    }
    
    @Column(name="ModifiedOn", length=23)
    public Date getModifiedOn() {
        return this.modifiedOn;
    }
    
    public void setModifiedOn(Date modifiedOn) {
        this.modifiedOn = modifiedOn;
    }
    
    @Column(name="RFU1", length=100)
    public String getRfu1() {
        return this.rfu1;
    }
    
    public void setRfu1(String rfu1) {
        this.rfu1 = rfu1;
    }
    
    @Column(name="RFU2", length=100)
    public String getRfu2() {
        return this.rfu2;
    }
    
    public void setRfu2(String rfu2) {
        this.rfu2 = rfu2;
    }
    
    @Column(name="RFU3", length=100)
    public String getRfu3() {
        return this.rfu3;
    }
    
    public void setRfu3(String rfu3) {
        this.rfu3 = rfu3;
    }
}
